package com.lxl.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * @author 刘星鹭
 * @Email liuxinglumail@163.com
 * @version 创建时间： 2014年9月12日 上午10:24:41
 */

@Entity
// 实体类
public class BookUser {

	private Integer bookUserNo; // 借书人编号
	private String bookUserName; // 借书人姓名
	private String bookUserPassword; // 借书人密码

	public BookUser() { // 无参构造方法
		super();
	}
	public BookUser(String bookUserName, String bookUserPassword) { // 带参构造方法
		super();
		this.bookUserName = bookUserName;
		this.bookUserPassword = bookUserPassword;
	}

	@Id
	// 主键
	@GeneratedValue(strategy = GenerationType.AUTO)
	// 自增长（不写就是AUTO）
	public Integer getBookUserNo() {
		return bookUserNo;
	}
	public void setBookUserNo(Integer bookUserNo) {
		this.bookUserNo = bookUserNo;
	}

	@Column(length = 20, nullable = false)
	// 字段长度为20，不可为空
	public String getBookUserName() {
		return bookUserName;
	}
	public void setBookUserName(String bookUserName) {
		this.bookUserName = bookUserName;
	}

	@Column(length = 20, nullable = false)
	// 字段长度为20，不可为空
	public String getBookUserPassword() {
		return bookUserPassword;
	}
	public void setBookUserPassword(String bookUserPassword) {
		this.bookUserPassword = bookUserPassword;
	}
}
